/*****************************************************************************/
/* File: MenuState.h					                                     */
/* Author: rszulgo                                                           */
/*                                                                           */
/* Description:																 */
/* Specialization of the CState class for the menu state. This displays a 	 */
/* menu in which the player can start a new game, continue an existing game, */
/* see the high-scores or exit the game.									 */
/*****************************************************************************/
#pragma once

#include "State.h"
#include "Font.h"
#include "GameState.h"
#include "TextControl.h"
#include "Picture.h"
#include <vector>


class CMainMenuState : public CState
{
public:
	~CMainMenuState(void);

	void getKeyPressed();
	void Draw();
	void EnterState();
	void setCurrentGame(CGameState* pGameState);
	static CMainMenuState* GetInstance(CStateManager* pManager, CRenderer* pRenderer, HDC hDC, HWND hWnd);

protected:
	CMainMenuState(CStateManager* pManager, CRenderer* pRenderer, HDC hDC, HWND hWnd);

private:
	void ResumeGame();
	// The player went up or down in 
	// the menu
	void SelectionUp();
	void SelectionDown();

	// The player validated the current selection
	void SelectionChosen();

	// add an item to the menu list
	int AddItem(CTextControl* pTextControl);	

	// Index of the current selected menu item
	int m_iCurrentSelection;

	// The background image
	TPicturePtr m_pBackgroundImg;

	// A pointer to the current active game (if any).
	CGameState* m_pCurrentGame;

	//vector of menu items
	vector<CTextControl*> m_vMenuItems;
};